

//
//  WYCHelpController.m
//  51信用卡
//
//  Created by 中企互联 on 2017/11/2.
//  Copyright © 2017年 中企互联. All rights reserved.
//

#import "WYCHelpController.h"

@interface WYCHelpController ()<UITableViewDelegate,UITableViewDataSource>
@property(nonatomic,strong)UITableView * tableView;
@end

@implementation WYCHelpController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //setNav
    [self setupNav];
    
    //创建界面
    [self setupCreat];
    

}

#pragma make -------->>创建界面
- (void)setupCreat{
    UIImageView * helpImageView = [[UIImageView alloc] init];
    helpImageView.frame = CGRectMake(0, 0, ScreenWidth, 100);
    helpImageView.image = [UIImage imageNamed:@"help_problem"];

    self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, NavHeight, ScreenWidth, ScreenHeight) style:UITableViewStylePlain];
    self.tableView.dataSource = self;
    self.tableView.scrollEnabled = NO;
    self.tableView.delegate = self;
    self.tableView.tableHeaderView = helpImageView;
    [self.view addSubview:self.tableView];
    
}
#pragma make -------->>setNav
- (void)setupNav {
    self.navigationItem.title = @"帮助中心";
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
    [self.navigationController.navigationBar setBarTintColor:wycMain];
    
    self.view.backgroundColor = WYCGlobalBg;
}
#pragma make -------->>数据代理  数据源方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return 8;
}


- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    
        return WYCcellHeight;
    
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    
    tableView.tableFooterView = [[UIView alloc] init];
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"123"];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"123"];
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    
    CGFloat cellX = 40 * px;
    CGFloat cellY = 40 * px;
    CGFloat cellW = ScreenWidth;
    CGFloat imageW = 80 * px;
    //    CGFloat imageH = 80 * px;
    
    if (indexPath.row == 0) {
        UIView * cellView = [[UIView alloc] init];
        cellView.frame = CGRectMake(0, 0, ScreenWidth, cell.height);
        [cell addSubview:cellView];
        
        UILabel * pushtitle = [[UILabel alloc] init];
        pushtitle.frame = CGRectMake(cellX, cellY, cellW, imageW);
        pushtitle.text = @"为什么卡片获取不到账单？";
        pushtitle.font = [UIFont systemFontOfSize:WyzFont];
        [cellView addSubview:pushtitle];
    }else if (indexPath.row == 1){
        UIView * cellView = [[UIView alloc] init];
        cellView.frame = CGRectMake(0, 0, ScreenWidth, cell.height);
        [cell addSubview:cellView];
        
        UILabel * pushtitle = [[UILabel alloc] init];
        pushtitle.frame = CGRectMake(cellX, cellY, cellW, imageW);
        pushtitle.text = @"如何新增卡片？";
        pushtitle.font = [UIFont systemFontOfSize:WyzFont];
        [cellView addSubview:pushtitle];
    }else if (indexPath.row == 2){
        UIView * cellView = [[UIView alloc] init];
        cellView.frame = CGRectMake(0, 0, ScreenWidth, cell.height);
        [cell addSubview:cellView];
        
        UILabel * pushtitle = [[UILabel alloc] init];
        pushtitle.frame = CGRectMake(cellX, cellY, cellW, imageW);
        pushtitle.text = @"支持哪些账单导入方式？";
        pushtitle.font = [UIFont systemFontOfSize:WyzFont];
        [cellView addSubview:pushtitle];
    }else if (indexPath.row == 3){
        UIView * cellView = [[UIView alloc] init];
        cellView.frame = CGRectMake(0, 0, ScreenWidth, cell.height);
        [cell addSubview:cellView];
        
        UILabel * pushtitle = [[UILabel alloc] init];
        pushtitle.frame = CGRectMake(cellX, cellY, cellW, imageW);
        pushtitle.text = @"如何删除卡片？";
        pushtitle.font = [UIFont systemFontOfSize:WyzFont];
        [cellView addSubview:pushtitle];
    }else if (indexPath.row == 4){
        UIView * cellView = [[UIView alloc] init];
        cellView.frame = CGRectMake(0, 0, ScreenWidth, cell.height);
        [cell addSubview:cellView];
        
        UILabel * pushtitle = [[UILabel alloc] init];
        pushtitle.frame = CGRectMake(cellX, cellY, cellW, imageW);
        pushtitle.text = @"智能还款是要多长时间？";
        pushtitle.font = [UIFont systemFontOfSize:WyzFont];
        [cellView addSubview:pushtitle];
    }else if (indexPath.row == 5){
        UIView * cellView = [[UIView alloc] init];
        cellView.frame = CGRectMake(0, 0, ScreenWidth, cell.height);
//        cellView.backgroundColor = WYCGlobalBg;
        [cell addSubview:cellView];
        
        UILabel * pushtitle = [[UILabel alloc] init];
        pushtitle.frame = CGRectMake(cellX, cellY, cellW, imageW);
        pushtitle.text = @"实名认证是要多长时间？";
        pushtitle.font = [UIFont systemFontOfSize:WyzFont];
        [cellView addSubview:pushtitle];
        
        
    }else if (indexPath.row == 6){
        UIView * cellView = [[UIView alloc] init];
        cellView.frame = CGRectMake(0, 0, ScreenWidth, cell.height);
        [cell addSubview:cellView];
        
        UILabel * pushtitle = [[UILabel alloc] init];
        pushtitle.frame = CGRectMake(cellX, cellY, cellW, imageW);
        pushtitle.text = @"提现多长时间到账？";
        pushtitle.font = [UIFont systemFontOfSize:WyzFont];
        [cellView addSubview:pushtitle];
        
        
    }else{
        UIView * cellView = [[UIView alloc] init];
        cellView.frame = CGRectMake(0, 0, ScreenWidth, cell.height);
        [cell addSubview:cellView];
        
        
        UILabel * pushtitle = [[UILabel alloc] init];
        pushtitle.frame = CGRectMake(cellX, cellY, cellW, imageW);
        pushtitle.text = @"我的钱包没钱智能换看是否进行？";
        pushtitle.font = [UIFont systemFontOfSize:WyzFont];
        [cellView addSubview:pushtitle];
    }
    
    return cell;
}


@end
